<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__PUBLIC__/admin/sncss/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/sncss/js/jquery.js"></script>


</head>


<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
		<li><a>首页</a></li>
		<li><a>订单管理</a></li>
		<li><a>新订单列表</a></li>
		<li><a onClick="javascript:history.back(-1);">返回</a></li>
		</ul>
		</div>

		<div class="rightinfo">
		<div class="tools">

		<form id="form1" name="form1" method="get" action="{:U('/Home/Order/theorder_list')}">
			 <!-- Unnamed (下拉列表框) -->

			 	<select class="newselect" id="u1_input" name="ordertype" >
					<option  value="0" <?php if($ordertype == 0){echo "selected='selected'";}?>>全部类型</option>
					<option  value="1" <?php if($ordertype == 1){echo "selected='selected'";}?>>背景音</option>
					<option  value="2" <?php if($ordertype == 2){echo "selected='selected'";}?>>自选</option>
				</select>
				<select class="newselect" id="u1_input" name="soundtype" >
					<option  value="0" <?php if($soundtype == 0){echo "selected='selected'";}?>>全部类型</option>
					<option  value="1" <?php if($soundtype == 1){echo "selected='selected'";}?>>讲述类</option>
					<option  value="2" <?php if($soundtype == 2){echo "selected='selected'";}?>>情感类</option>
					<option  value="3" <?php if($soundtype == 3){echo "selected='selected'";}?>>演绎类</option>
					<option  value="4" <?php if($soundtype == 4){echo "selected='selected'";}?>>新闻类</option>
					<option  value="5" <?php if($soundtype == 5){echo "selected='selected'";}?>>英文类</option>
				</select>
				<select class="newselect" id="u2_input" name="levelkey" >
					<option selected value="0">请选择等级</option>
					<?php foreach ($leveldata as $key => $value) {?>
					<option  value="<?php echo $value['id'];?>" <?php if($levelkey == $value['id']){echo "selected='selected'";}?>><?php echo $value['message'];?></option>
					<?php }?>
				</select>
			<!-- Unnamed (下拉列表框) -->

				<input name="order_name" type="text" class="dfinput" placeholder="搜索自媒体/标题/订单编号" id="user" value="<?php echo $order_name;?>" />
				<input name="" type="submit" class="btn" value="搜索"/>
		</form>
		<a href="{:U('/Home/Daochu/theorder')}" style="border:none;width:100px;height:40px; font-size:14px; cursor:pointer; line-height:40px;background:#61afdf;color:#fff;text-align:center;text-indent:0;display:block;float: left;margin-left: 5px;">导出</a>
		</div>
		<table class="tablelist">
			<thead>
			<tr>
				<th width="120">订单编号</th>
				<th>自媒体名称</th>
				<th width="180">标题</th>
				<th>类型</th>
				<th>级别</th>
				<th>性别</th>
				<th width="80">现价</th>
				<th width="40">背景</th>
				<th width="150">下单时间</th>
				<th width="70">接单主播</th>
				<th width="110">订单状态</th>
				<th>次数</th>
				<th>操作</th>
				</tr>
				</thead>
				<tbody>

	<foreach name='orderinfo' item='v'>
		<tr>
			<td>{$v.number}</td>
			<td>{$v.mname}({$v.ordernum})</td>
			<td>
				<if condition="$v.newsingle == 1">
				    (新人)
				</if>
				<if condition="$v.ischose == 1">
				    (自选)
				</if>
				<a href="{:U('/Home/Order/order_edit',array('oid'=>$v['id']))}" class="tablelink" title="<?php echo $v['title'];?>"><?php echo mb_strlen($v['title']) > 10 ? mb_substr($v['title'],0,10, 'utf-8').'...' : $v['title'];?></a></td>
			<td>
				<switch name="v.type" >
				<case value="0">讲述类</case>
				<case value="1">情感类</case>
				<case value="2">演绎类</case>
				<case value="3">新闻类</case>
				<case value="4">英文类</case>
				<default />未知
				</switch>
			</td>
			<td>{$v.level_type}</td>
			<td>
				<switch name="v.sex" >
				<case value="0">全部</case>
				<case value="1">男</case>
				<case value="2">女</case>
				<default />未知
				</switch>
			</td>
			<td>{$v.usemoney}({$v.paytype})</td>
			<td><if condition="$v.bgmid != 0">有<else />无</if></td>
			<td>{$v.releasetime|date="Y-m-d H:i:s",###}</td>
			<td>{$v.uuid}</td>
			<td>
				<switch name="v.state" >
				<case value="0">已作废</case>
				<case value="1">
				<if condition="$v.is_pay eq 0">
					<if condition="$v.demand eq 0">
					<a href="{:U('/Home/Signorder/confirm_pay',array('oid'=>$v['id']))}" class="tablelink" onclick="if(confirm('确认支付吗?')==false)return false;">(签约单支付)</a>
					<else />
					<a href="{:U('/Home/Order/confirm_pay',array('oid'=>$v['id']))}" class="tablelink" onclick="if(confirm('确认支付吗?')==false)return false;layerload();">(散单支付)</a>
					</if>
				<a href="{:U('/Home/Order/cancel_pay',array('oid'=>$v['id']))}" class="tablelink" onclick="if(confirm('确认取消吗?')==false)return false;">(取消)</a>
				<elseif condition="$v.is_pay eq 2" />支付超时关闭
				<else />待抢单
				</if>
				</case>
				<case value="2">待交付</case>
				<case value="3">已交付未结算</case>
				<case value="4">已交付已结算</case>
				<case value="5">需要重新上传音频</case>
				<case value="6">无人接单<a href="{:U('/Home/Order/order_reorder',array('oid'=>$v['id']))}" class="tablelink" onclick="if(confirm('确认编辑订单吗?')==false)return false;">编辑订单</a></case>
				<case value="7">超时未能完成</case>
				<case value="8">用户主动取消订单</case>
				<default />未知
				</switch>
			</td>
			<td>{$v.attempts}</td>
			<td>
			<a href="{:U('/Home/Order/order_edit',array('oid'=>$v['id']))}" class="tablelink">详情</a>
			<?php if(!empty($v['linkaudio'])&&$v['state']==3){?>
			<a href="/Home/Order/order_score?oid=<?php echo $v['id'];?>" class="tablelink">评分</a>
			<a href="javascript:void(0);" onclick="orderpass(<?php echo $v['id'];?>)" class="tablelink">不通过</a>
			<?php }?>
			<?php if(!empty($v['linkaudio'])&&$v['state']==4){?>
			<a class="tablelink">已评分</a>
			<?php }?>

			</td>
		</tr>
	</foreach>

				</tbody>
		</table>
		<style>.pages a,.pages span {
		display:inline-block;
		padding:2px 5px;
		margin:0 1px;
		border:1px solid #f0f0f0;
		-webkit-border-radius:3px;
		-moz-border-radius:3px;
		border-radius:3px;
}
.pages a,.pages li {
		display:inline-block;
		list-style: none;
		text-decoration:none; color:#58A0D3;
}
.pages a.first,.pages a.prev,.pages a.next,.pages a.end{
		margin:0;
}
.pages a:hover{
		border-color:#50A8E6;
}
.pages span.current{
		background:#50A8E6;
		color:#FFF;
		font-weight:700;
		border-color:#50A8E6;
}</style>

	 <div class="pages"><br />

												<div align="right">{$page}
												</div>
	 </div>

		</div>

		<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>
<script src="__PUBLIC__/js/jquery1.8.3.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<style type="text/css">
.newselect2{
  height:36px;
  line-height:36px;
  border:1px solid #c5c5c5;
  width: 400px;
}
.mainlist{padding:10px;}
</style>
<script type="text/javascript">
var change = function(sel){
		document.getElementById("passmessage").value = sel.value;
}
function orderpass(oid){
		layer.open({title: false, type: 1, area: ['600px', '300px'], //宽高
				content: '<div class="mainlist"><form id="form2" name="form2" method="post" action="/Home/Order/order_pass" onsubmit="return form2_submit();"><select class="newselect2" name="message" onchange="change(this)">'
				+'<option value="就是任性，就是想驳回，不需要理由">备选驳回原因</option>'
				+'<option value="录音环境嘈杂">录音环境嘈杂</option>'
				+'<option value="音频质量不达标">音频质量不达标</option>'
				+'<option value="片头背景音不符合">片头背景音不符合</option>'
				+'</select><br><br><textarea class="textinput" name="passmessage" id="passmessage"></textarea>'
				+'<input name="oid"  type="hidden" class="dfinput" value="'+oid+'" />'
				+'<br><br><input type="submit" class="btn" value="审核驳回"/></form></div>'
		});
}
</script>
<script type="text/javascript">

		function form2_submit(){
				var passmessage= $('#passmessage').val();
				if(passmessage.length==0){
						layer.msg('必须填写理由');return false;
						// alert('必须填写理由');return false;
				}
		}

	function layerload(){
		layer.load(1, {shade: [0.8, '#393D49']});
	}
</script>
</html>
